package com.elock.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.elock.base.core.entity.BaseEntity;

/**
 * Entity - 用户机构关系
 * @author 仁德
 */
@Entity
@Table(name = "member_sale_org")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "member_sale_org_sequence")
public class MemberSaleOrg extends BaseEntity {

	private static final long serialVersionUID = -2062692655913428836L;

	/** 用户 */
	private Member member;

	/** 机构 */
	private SaleOrg saleOrg;

	/**
	 * 获取 用户
	 * 
	 * @return member
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	public Member getMember() {
		return member;
	}

	/**
	 * 设置 用户
	 * 
	 * @param member
	 *            用户
	 */
	public void setMember(Member member) {
		this.member = member;
	}

	/**
	 * 获取 机构
	 * 
	 * @return saleOrg
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	public SaleOrg getSaleOrg() {
		return saleOrg;
	}

	/**
	 * 设置 机构
	 * 
	 * @param saleOrg
	 *            机构
	 */
	public void setSaleOrg(SaleOrg saleOrg) {
		this.saleOrg = saleOrg;
	}

}